function [kmaps training_set, error] = tests(maps)
  training_set(1) = randData(200, 5, 2, 1);
  training_set(2) = randData(200, 5, 2, 0);
  nombres = {'intenso' 'regular'};
  size = [15 15];
  for x = (1:maps)
      for y = 1:2
          kmaps(x,y) = kohonen(training_set(y), size, 1, [char(nombres(y)) ' ' int2str(x)]);
          graficar(kmaps(x,y), training_set(y));
          error(x,y) = analizarError(kmaps(x,y), training_set(y));
      end
  end
end

function error = analizarError(map, oldData)
    newData = randData(200, 5, 2, oldData.intense);
    map.labels = labelize(map, oldData);
    activadas = som_bmus(map, newData);
    activadas = map.labels(activadas);
    diff = strcmp(activadas, newData.labels);
    hitrate = sum(diff)/length(diff);
    error = 1 - hitrate;
end
